<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
<h:head>
</h:head>
 	<f:metadata>
    	<f:viewParam name="partyname" value="#{electionPartyBean.currentparty.name}"/>
	</f:metadata>
	<h:body>
	<ui:include src="/horizontal_menu.xhtml">
	</ui:include>
	<center><h3>Choose Party and Members</h3></center><br/>
		<h:form>
		 <p:panel id="panel" style="margin-bottom:10px;">
		 
		 <f:facet name="header" >
		 		<h:outputLabel style="margin-right:10px" value="#{electionPartyBean.currentparty.name}" />
		 </f:facet>
      	 <f:facet name="footer" >
			    <h:commandButton id="pr" action="#{electionPartyBean.previus()}" value="previousParty" rendered="#{electionPartyBean.hasPrevious()}"> 
			    </h:commandButton>
			    <h:commandButton id="nx" style="margin-right:10px" action="#{electionPartyBean.next()}" value="nextParty" rendered="#{electionPartyBean.hasNext()}">
			    </h:commandButton>
          </f:facet>		    
        	<h:panelGrid columns="2">
            <h:outputLabel for="symbol" value="Symbol:" />
         <h:graphicImage value="#{('/partysymbols//'.concat(electionPartyBean.currentparty.symbol))}" width="200" height="171" />
 
            <h:outputLabel for="program" value="Program:" />
            <h:outputLabel id="program" value="#{electionPartyBean.currentparty.program}" />
            <h:commandButton  id="Vote" style="margin-right:10px" action="#{electionPartyBean.vote}" value="Vote For this party"/>
                        
        </h:panelGrid>
    </p:panel>
	</h:form>
	
	</h:body>
</html>